package com.qidian.buy.item.mq;

import com.qidian.buy.goods.vo.DemoUser;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Author: 戴着假发的程序员
 * Date: 2024-05-15 11:31
 * company: 起点编程
 **/
@Component
public class PojoReceive {

    @RabbitListener(queues = {"pojo-queue"})
    public void receivePojo(DemoUser demoUser) {
        System.out.println("接收到的消息是：" + demoUser.getName() + ":" +demoUser.getId());
    }
}
